<!-- 选中的英雄 -->
<div *ngIf="hero">
  <!-- 管道对于一些数据的格式化显示非常方便 -->
  <h2>{{hero.name | uppercase}} Details</h2>

  <div><span>id：</span>{{hero.id}}</div>
  <div>
    <label for="hero-name">Hero name：</label>
    <input id="hero-name" [(ngModel)]="hero.name" placeholder="name">
  </div>
</div>

<button type="button" (click)="goBack()">go back</button>
<button type="button" (click)="save()">save</button>
